<template>
  <div>
    <div class="pay">请选择支付方式</div>
    <div class="all">
      <div class="six" v-for="(v, index) in list" :key="index">
        <img class="img1" :src="v.src" />
        <p>{{ v.name }}</p>
        <van-icon class="img3" name="arrow" />
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: [],
    };
  },
  mounted() {
    this.$http({
      url: "http://localhost:3000/payway",
      method: "get",
    }).then((res) => {
      this.list = res.data;
    });
  },
};
</script>

<style lang="scss" scoped>
.img1 {
  width: 2rem;
  // height: 2rem;
  margin-right: 1rem;
}

.six {
  display: flex;
  height: 3.5625rem;
  align-items: center;
  padding: 0.9375rem;
}
.img3 {
  position: absolute;
  right: 1rem;
}
.pay {
  font-size: 16px;
  margin-left: 0.9375rem;
}
.all {
  border-radius: 8px;
  background-color: white;
  margin: 15px;
}
</style>